package com.itheima.homework;

/**
 * 数组拷贝
 */
public class Homework05 {
    public static void main(String[] args) {
        int[] arr = {11,22,33};
        returnArray(arr);



    }

    public static int[] returnArray(int[] arr) {
        int[] arr2 = new int[arr.length];
        for (int i = 0; i < arr.length; i++) {
            arr2[i] = arr[i];
        }
        //数组拷贝后 打印数组2的值
        for (int i = 0; i < arr2.length; i++) {
            System.out.print(arr2[i] + " ");
        }
        return arr2;
    }
}
